#include "include/config.h"
#include "memory/memory.h"
#include "cxx.h"

namespace std
{
void __attribute__((section("osheadsection"))) abort() throw()
{
	while (true) {}
}
}

namespace zero
{
void INITTEXT cxx_init(void)
{
	ABIBase::push(ABIBase::create(NULL, os_allocator, os_free));
}

extern "C" void __cxa_pure_virtual(void)
{
	std::abort();
}
EXPORT_CSYMBOL(__cxa_pure_virtual);

extern "C" void __dso_handle(void*)
{
}
EXPORT_CSYMBOL(__dso_handle);

extern "C" void __cxa_atexit(void (*)(void*), void*, void*)
{
}
EXPORT_CSYMBOL(__cxa_atexit);
}
